#include "imagewindow.h"

ImageWindow::ImageWindow() {
    CreateMainWindow();
}

ImageWindow::~ImageWindow() {
    delete label;
    delete layout;
}

void ImageWindow::CreateMainWindow() {
    setWindowTitle("AliPay");
    setWindowIcon(QIcon(":/material/Ui/alipay.png"));

    setMinimumSize(256, 256);
    setMaximumSize(256, 256);

    SetWidgets();
}

void ImageWindow::SetWidgets() {
    label = new QLabel();
    label -> setPixmap(QPixmap::fromImage(QImage(":/material/Ui/alipay-reward-image.png")));
    label -> setAlignment(Qt::AlignCenter);

    layout = new QHBoxLayout();
    layout -> addWidget(label);

    this -> setLayout(layout);
}
